<?php

class MyItems extends UserController {

    function __construct() {
        parent::__construct();
    }
    
    function index() {
        $this->view->render('myItem/index');
    }

    public function add()
    {
        $this->add_step1();
    }
    
    public function add_step1()
    {
        $this->view->categories = $this->model->getAllCategories();
        $this->view->render('myItem/add_step1');
    }
    
    public function submit_step1()
    {
        $this->model->submit_step1();
        $this->add_step2();
    }
    
    public function add_step2()
    {
        $this->view->fields = $this->model->getCategorySchema();
        $this->view->render('myItem/add_step2');
    }

    public function submit_step2()
    {
        $this->model->submit_step2();
        $this->add_step3();
    }
    
    public function add_step3()
    {
        $this->view->render('myItem/add_step3');
    }

     public function submit_step3()
    {
        $this->model->uploadImage();
    }
}